//////////////////////////////////////////////
///                                        ///
/// PPA-1's Control Unit                   ///
///                                        ///
/// Released under CERN Open Hardware      ///
/// License                                ///
///                                        ///
/// Marce Coll 2017 - ppa@marcecoll.com    ///
///                                        ///
//////////////////////////////////////////////


`include "ppa1_defines.v"

module ppa1_control(
                    alu_op,
                    instr,
                    reset, clk
                    );

   parameter instr_w = `PPA1_OPERAND_WIDTH;

   input                            reset;
   input                            clk;
   input [instr_w-1:0]              instr;

   output [instr_w-1:instr_w-4]   alu_op;


   assign alu_op = `PPA1_ALUOP_OR;

   always @(negedge reset) begin
      $finish;
   end

   always @(posedge clk) begin
      alu_op <= instr[instr_w-1:instr_w-4];
   end

endmodule; // ppa1_control
